<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>一个简单的函数</title>
</head>
<script>
    function myFunction(){
        document.getElementById("demo").innerHTML = "hello fuck";
    }
</script>
<body>
    <p>单击“试一试”时，将调用一个函数。</p>
    <p>该功能将显示一条消息。</p>
    <button onclick="myFunction()">试试</button>
    <p id="demo"></p>
</body>

</html>
